Virtual machine (VM) is an operating environment that executes on a computing hardware with its own operating system (OS). A VM can execute applications that run within the confines of its respective OS. Furthermore, multiple VMs can be executed on a single hardware, with each VM handling the associated overhead of its own execution on the hardware. This overhead is required to ensure the proper operation of the VM on its own. In the case where multiple VMs execute on a single hardware, i.e., a computing platform that handles the plurality of VMs, it is essential at all times to ensure that operation is maintained in the correct context for each VM, and each application executing thereon.
In certain cases, execution of certain instructions in a VM context may require a VM exit in order to properly handle the instruction. A VM exit marks the point at which a transition is made from the VM currently running to the hypervisor of the VM, which must exercise system control for a particular reason. A VM exit occurs in response to certain instructions and/or events and inflicts significant performance degradation. In general, when a VM exit occurs, the processor must save a snapshot of the VM's state as it was running at the time of the exit. The VM exit may be required, for example, with instructions that handle descriptor tables. In the Intel® x86® architecture, instructions such as a load global descriptor table (LGDT) register and a load interrupt descriptor table (LIDT) require VM exits, in order to properly handle the requirements associated with these instructions within the VM context. However, and as would be appreciated by those of ordinary skill in the art, the processing time overhead of such a VM exit is significant, which in turn reduces the performance of the VM. For example, in Intel® x86® processor architecture a VM exit requires saving the processing state, recoding information about the VM exit operation, saving the current states of the descriptor tables, and so on.
It would be therefore advantageous to provide a solution that would reduce the overhead associated with a VM exit procedure.